home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / lang / SmallEiffel.lha / SmallEiffel / sys / gc_lib / sparc.c < prev    next >
Encoding:
Text File  |  1998-12-22  |  1.2 KB  |  33 lines

  1. /*
  2. -- This file is  free  software, which  comes  along  with  SmallEiffel. This
  3. -- software  is  distributed  in the hope that it will be useful, but WITHOUT 
  4. -- ANY  WARRANTY;  without  even  the  implied warranty of MERCHANTABILITY or
  5. -- FITNESS  FOR A PARTICULAR PURPOSE. You can modify it as you want, provided
  6. -- this header is kept unaltered, and a notification of the changes is added.
  7. -- You  are  allowed  to  redistribute  it and sell it, alone or as a part of 
  8. -- another product.
  9. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  10. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  11. --                       http://www.loria.fr/SmallEiffel
  12. --
  13. */
  14. /* 
  15.    For SPARC architecture.
  16.    As this file contains assembly code (asm), you must not use
  17.    the flag -ansi of gcc (in file ${SmallEiffel}/sys/compiler.*).
  18. */
  19.  
  20. void mark_loop(void){
  21.   void**stack_pointer;
  22.   void*stack_top[2]={NULL,NULL};
  23.   stack_pointer=stack_top;
  24.   /* Addresses decrease as the stack grows. */
  25.   for(; stack_pointer <= stack_bottom; stack_pointer++)
  26.     gc_mark(*stack_pointer);
  27. }
  28.  
  29. void mark_stack_and_registers(void){
  30.   asm("    ta    0x3   ! ST_FLUSH_WINDOWS");
  31.   mark_loop();
  32. }
  33.